package com.cw.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.cw.entity.ErApplyOut;
import com.cw.mapper2.ErApplyOutMapper;
import com.cw.service.IErApplyOutService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 电子开单-门诊病人申请记录--胡思聪-2011.05.17 服务实现类
 * </p>
 *
 * @author ly
 * @since 2021-08-25
 */
@Service
public class ErApplyOutServiceImpl extends ServiceImpl<ErApplyOutMapper, ErApplyOut> implements IErApplyOutService {

    /**
     * 通过门诊号查询总共有多少检查
     * @param clinicCode 诊断号
     * @return java.lang.Integer
     */
    @Override
    public Integer countErApplyOutNumByClinicCode(String clinicCode) {
        LambdaQueryWrapper<ErApplyOut> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(ErApplyOut::getBrcfh, clinicCode);
        return count(lambdaQueryWrapper);
    }
}
